xl: fix xl cpupool-list <poolid>
authorAndre Przywara <andre.przywara@amd.com>
Fri, 28 Jan 2011 17:45:24 +0000 (17:45 +0000)
committerAndre Przywara <andre.przywara@amd.com>
Fri, 28 Jan 2011 17:45:24 +0000 (17:45 +0000)
The help screen of xl cpupool-list promises to allow a CPU pool to
be named on the command line, which will then be listed only.
Probably caused by a "DeMorgan brain twist" this specific CPU pool
is _omitted_ instead. The patch fixes this, so single CPU pools
can be explicitly listed again.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c

index f1917432cd335110280cff18218949c346d0fdab..be0145d12a1f9dc2fab10504d41c5cebd2ef0910 100644 (file)
@@ -5446,7 +5446,7 @@ int main_cpupoollist(int argc, char **argv)
         printf("CPUs   Sched     Active   Domain count\n");
 
     for (p = 0; p < n_pools; p++) {
-        if (!ret && (!pool || (poolinfo[p].poolid != poolid))) {
+        if (!ret && (!pool || (poolinfo[p].poolid == poolid))) {
             name = libxl_cpupoolid_to_name(&ctx, poolinfo[p].poolid);
             if (!name) {
                 fprintf(stderr, "error getting cpupool info\n");